
<%@ page import="com.erpanderp.pr.model.entity.PurchaseRequest" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'purchaseRequest.label', default: 'PurchaseRequest')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-purchaseRequest" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-purchaseRequest" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list purchaseRequest">
			
				<g:if test="${purchaseRequestInstance?.purchaseRequestCode}">
				<li class="fieldcontain">
					<span id="purchaseRequestCode-label" class="property-label"><g:message code="purchaseRequest.purchaseRequestCode.label" default="Purchase Request Code" /></span>
					
						<span class="property-value" aria-labelledby="purchaseRequestCode-label"><g:fieldValue bean="${purchaseRequestInstance}" field="purchaseRequestCode"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.sapPrNumber}">
				<li class="fieldcontain">
					<span id="sapPrNumber-label" class="property-label"><g:message code="purchaseRequest.sapPrNumber.label" default="Sap Pr Number" /></span>
					
						<span class="property-value" aria-labelledby="sapPrNumber-label"><g:fieldValue bean="${purchaseRequestInstance}" field="sapPrNumber"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.documentType}">
				<li class="fieldcontain">
					<span id="documentType-label" class="property-label"><g:message code="purchaseRequest.documentType.label" default="Document Type" /></span>
					
						<span class="property-value" aria-labelledby="documentType-label"><g:fieldValue bean="${purchaseRequestInstance}" field="documentType"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.description}">
				<li class="fieldcontain">
					<span id="description-label" class="property-label"><g:message code="purchaseRequest.description.label" default="Description" /></span>
					
						<span class="property-value" aria-labelledby="description-label"><g:fieldValue bean="${purchaseRequestInstance}" field="description"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.createdBy}">
				<li class="fieldcontain">
					<span id="createdBy-label" class="property-label"><g:message code="purchaseRequest.createdBy.label" default="Created By" /></span>
					
						<span class="property-value" aria-labelledby="createdBy-label"><g:fieldValue bean="${purchaseRequestInstance}" field="createdBy"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.lastUpdatedBy}">
				<li class="fieldcontain">
					<span id="lastUpdatedBy-label" class="property-label"><g:message code="purchaseRequest.lastUpdatedBy.label" default="Last Updated By" /></span>
					
						<span class="property-value" aria-labelledby="lastUpdatedBy-label"><g:fieldValue bean="${purchaseRequestInstance}" field="lastUpdatedBy"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.status}">
				<li class="fieldcontain">
					<span id="status-label" class="property-label"><g:message code="purchaseRequest.status.label" default="Status" /></span>
					
						<span class="property-value" aria-labelledby="status-label"><g:fieldValue bean="${purchaseRequestInstance}" field="status"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.dateCreated}">
				<li class="fieldcontain">
					<span id="dateCreated-label" class="property-label"><g:message code="purchaseRequest.dateCreated.label" default="Date Created" /></span>
					
						<span class="property-value" aria-labelledby="dateCreated-label"><g:formatDate date="${purchaseRequestInstance?.dateCreated}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.lastUpdated}">
				<li class="fieldcontain">
					<span id="lastUpdated-label" class="property-label"><g:message code="purchaseRequest.lastUpdated.label" default="Last Updated" /></span>
					
						<span class="property-value" aria-labelledby="lastUpdated-label"><g:formatDate date="${purchaseRequestInstance?.lastUpdated}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.purchaseRequestItems}">
				<li class="fieldcontain">
					<span id="purchaseRequestItems-label" class="property-label"><g:message code="purchaseRequest.purchaseRequestItems.label" default="Purchase Request Items" /></span>
					
						<g:each in="${purchaseRequestInstance.purchaseRequestItems}" var="p">
						<span class="property-value" aria-labelledby="purchaseRequestItems-label"><g:link controller="purchaseRequestItem" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.purchaseRequestTransactionViews}">
				<li class="fieldcontain">
					<span id="purchaseRequestTransactionViews-label" class="property-label"><g:message code="purchaseRequest.purchaseRequestTransactionViews.label" default="Purchase Request Transaction Views" /></span>
					
						<g:each in="${purchaseRequestInstance.purchaseRequestTransactionViews}" var="p">
						<span class="property-value" aria-labelledby="purchaseRequestTransactionViews-label"><g:link controller="purchaseRequestTransactionView" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.schedules}">
				<li class="fieldcontain">
					<span id="schedules-label" class="property-label"><g:message code="purchaseRequest.schedules.label" default="Schedules" /></span>
					
						<g:each in="${purchaseRequestInstance.schedules}" var="s">
						<span class="property-value" aria-labelledby="schedules-label"><g:link controller="schedule" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${purchaseRequestInstance?.user}">
				<li class="fieldcontain">
					<span id="user-label" class="property-label"><g:message code="purchaseRequest.user.label" default="User" /></span>
					
						<span class="property-value" aria-labelledby="user-label"><g:link controller="user" action="show" id="${purchaseRequestInstance?.user?.id}">${purchaseRequestInstance?.user?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${purchaseRequestInstance?.id}" />
					<g:link class="edit" action="edit" id="${purchaseRequestInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
